//
//  LView.m
//  MyProject
//
//  Created by dllo on 15/10/31.
//  Copyright (c) 2015年 蓝鸥0825. All rights reserved.
//

#import "LView.h"
#define WIDTH self.frame.size.width
#define HEIGHT self.frame.size.height

@implementation LView

- (instancetype)initWithFrame:(CGRect)frame{
    
    self = [super initWithFrame:frame];
    if (self) {
        
        [self create];
        
    }
    return self;
}

- (void)create{
    
    self.firstLabel = [[UILabel alloc] initWithFrame:CGRectMake(WIDTH / 33 * 2, HEIGHT / 22 * 3, WIDTH / 33 * 15, HEIGHT / 22 * 14)];
    [self addSubview:self.firstLabel];
    self.firstLabel.layer.borderWidth = 1;
    self.firstLabel.layer.cornerRadius = 10;
    self.firstLabel.font = [UIFont systemFontOfSize:30 weight:30];
    self.firstLabel.textAlignment = NSTextAlignmentCenter;
    
    self.buttonFirst = [UIButton buttonWithType:UIButtonTypeSystem];
    self.buttonFirst.frame = CGRectMake(WIDTH / 33 * 17, HEIGHT / 22 * 7, WIDTH / 33 * 5, HEIGHT / 22 * 9);
    self.buttonFirst.layer.borderWidth = 1;
    self.buttonFirst.layer.cornerRadius = HEIGHT / 22 * 9 / 2;
    [self addSubview:self.buttonFirst];
    self.buttonFirst.backgroundColor = [UIColor colorWithRed:0 green:0 blue:1 alpha:0.4];
    [self.buttonFirst setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    
    self.buttonSecond = [UIButton buttonWithType:UIButtonTypeSystem];
    self.buttonSecond.frame = CGRectMake(WIDTH / 33 * 22, HEIGHT / 22 * 7, WIDTH / 33 * 5, HEIGHT / 22 * 9);
    self.buttonSecond.layer.borderWidth = 1;
    self.buttonSecond.layer.cornerRadius = HEIGHT / 22 * 9 / 2;
    [self addSubview:self.buttonSecond];
    self.buttonSecond.backgroundColor = [UIColor colorWithRed:0.8 green:0 blue:1 alpha:0.4];
    
    
    self.buttonThird = [UIButton buttonWithType:UIButtonTypeSystem];
    self.buttonThird.frame = CGRectMake(WIDTH / 33 * 27, HEIGHT / 22 * 7, WIDTH / 33 * 5, HEIGHT / 22 * 9);
    self.buttonThird.layer.borderWidth = 1;
    self.buttonThird.layer.cornerRadius = HEIGHT / 22 * 9 / 2;
    [self addSubview:self.buttonThird];
    self.buttonThird.backgroundColor = [UIColor colorWithRed:0 green:1 blue:0 alpha:0.4];
}



@end
